package com.jymj.service.impl;

import com.jymj.dao.PjResDao;
import com.jymj.entity.gantt.PjResource;
import com.jymj.service.PjResService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * Created by ljj on 2017/8/14.
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class PjResServiceImpl implements PjResService {

    @Autowired
    private PjResDao pjResDao;

    @Override
    public List<PjResource> queryList(Map<String, Object> map) {
        return pjResDao.queryList(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map) {
        return pjResDao.queryTotal(map);
    }

    @Override
    public PjResource queryObject(Long resId) {
        return pjResDao.queryObject(resId);
    }

    @Override
    public void save(PjResource res) {
        pjResDao.save(res);
    }

    @Override
    public void update(PjResource res) {
        pjResDao.update(res);
    }

    @Override
    public void deleteBatch(Long[] resIds) {
        pjResDao.deleteBatch(resIds);
    }

    @Override
    public List<PjResource> queryResTaskList(Integer pjid) {
        return pjResDao.queryResTaskList(pjid);
    }
}
